<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
DRA Systems: OR-Objects 1.2.4: Class  QuadraticMatrix
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../drasys/or/stat/model/PolynomialMatrix.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../drasys/or/stat/model/ReverseLinear.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="QuadraticMatrix.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_drasys.or.matrix.FunctionMatrix">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
drasys.or.stat.model</FONT>
<BR>
Class  QuadraticMatrix</H2>
<PRE>
java.lang.Object
  |
  +--<A HREF="../../../../drasys/or/matrix/RealContainer.html">drasys.or.matrix.RealContainer</A>
        |
        +--<A HREF="../../../../drasys/or/matrix/Matrix.html">drasys.or.matrix.Matrix</A>
              |
              +--<A HREF="../../../../drasys/or/matrix/FunctionMatrix.html">drasys.or.matrix.FunctionMatrix</A>
                    |
                    +--<B>drasys.or.stat.model.QuadraticMatrix</B>
</PRE>
<HR>
<DL>
<DT>public class <B>QuadraticMatrix</B><DT>extends <A HREF="../../../../drasys/or/matrix/FunctionMatrix.html">FunctionMatrix</A></DL>

<P>
Adds virtual columns to a matrix for quadratic modeling.
The new array contains the original columns followed by all pair-wise product terms.
The method 'getProductIndex' can be used to find the index of the product terms from the original column indices.
If the original matrix has 'n' columns then the quadratic matrix will have 'n+n^2' columns and be defined as:<BR>
<BR>
Q[i][0,...,n-1] = M[i][0,...,n-1]   (Original variables)<BR>
Q[i][n + j*n + k] = M[i][j]*M[i][k] (Products)<BR>
<BR>
<P><FONT COLOR="#CC0000"><FONT SIZE=+1>References:</FONT></FONT><FONT SIZE=+1></FONT><P><B><A NAME="0256117365"HREF="http://www.amazon.com/exec/obidos/ISBN=0256117365/opsresearchcomA/" TARGET="amazon.com">Applied Linear Statistical Models (Irwin Series in Statistics)</A></B><BR>&nbsp;&nbsp;&nbsp;&nbsp;Michael H. Kutner, et al / Hardcover / Published 1996<BR><B><A NAME="0521431085"HREF="http://www.amazon.com/exec/obidos/ISBN=0521431085/opsresearchcomA/" TARGET="amazon.com">Numerical Recipes in C : The Art of Scientific Computing</A></B><BR>&nbsp;&nbsp;&nbsp;&nbsp;William H. Press, et al / Hardcover / Published 1993<BR>
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../../../serialized-form.html#drasys.or.stat.model.QuadraticMatrix">Serialized Form</A></DL>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->

<A NAME="fields_inherited_from_class_drasys.or.matrix.FunctionMatrix"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from class drasys.or.matrix.<A HREF="../../../../drasys/or/matrix/FunctionMatrix.html">FunctionMatrix</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../drasys/or/matrix/FunctionMatrix.html#_sizeOfColumns">_sizeOfColumns</A>,  
<A HREF="../../../../drasys/or/matrix/FunctionMatrix.html#_sizeOfRows">_sizeOfRows</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_drasys.or.matrix.RealContainer"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from class drasys.or.matrix.<A HREF="../../../../drasys/or/matrix/RealContainer.html">RealContainer</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../drasys/or/matrix/RealContainer.html#_epsilon">_epsilon</A>,  
<A HREF="../../../../drasys/or/matrix/RealContainer.html#_globalEpsilon">_globalEpsilon</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../drasys/or/stat/model/QuadraticMatrix.html#QuadraticMatrix(drasys.or.matrix.MatrixI)">QuadraticMatrix</A></B>(<A HREF="../../../../drasys/or/matrix/MatrixI.html">MatrixI</A>&nbsp;matrix)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add columns to matrix to create a new matrix containing the original variables plus the quadratic variables.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/stat/model/QuadraticMatrix.html#functionElementAt(int, int)">functionElementAt</A></B>(int&nbsp;row,
                  int&nbsp;column)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Computes the values for the additional columns.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../drasys/or/stat/model/QuadraticMatrix.html#getProductIndex(int, int)">getProductIndex</A></B>(int&nbsp;column1,
                int&nbsp;column2)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the index of the column in the quadratic matrix for the product term for column-1 and column-2.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_drasys.or.matrix.FunctionMatrix"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class drasys.or.matrix.<A HREF="../../../../drasys/or/matrix/FunctionMatrix.html">FunctionMatrix</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../drasys/or/matrix/FunctionMatrix.html#elementAt(int, int)">elementAt</A>, 
<A HREF="../../../../drasys/or/matrix/FunctionMatrix.html#isColumnMajor()">isColumnMajor</A>, 
<A HREF="../../../../drasys/or/matrix/FunctionMatrix.html#isNull(int, int)">isNull</A>, 
<A HREF="../../../../drasys/or/matrix/FunctionMatrix.html#isRowMajor()">isRowMajor</A>, 
<A HREF="../../../../drasys/or/matrix/FunctionMatrix.html#setElementAt(int, int, double)">setElementAt</A>, 
<A HREF="../../../../drasys/or/matrix/FunctionMatrix.html#setElements(double)">setElements</A>, 
<A HREF="../../../../drasys/or/matrix/FunctionMatrix.html#sizeOfColumns()">sizeOfColumns</A>, 
<A HREF="../../../../drasys/or/matrix/FunctionMatrix.html#sizeOfElements()">sizeOfElements</A>, 
<A HREF="../../../../drasys/or/matrix/FunctionMatrix.html#sizeOfRows()">sizeOfRows</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_drasys.or.matrix.Matrix"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class drasys.or.matrix.<A HREF="../../../../drasys/or/matrix/Matrix.html">Matrix</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../drasys/or/matrix/Matrix.html#columnElements(int)">columnElements</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#elements()">elements</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#equals(drasys.or.matrix.MatrixI)">equals</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#equals(java.lang.Object)">equals</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#getArray()">getArray</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#rowElements(int)">rowElements</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#setColumn(int, drasys.or.matrix.VectorI)">setColumn</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#setDiagonal(drasys.or.matrix.VectorI)">setDiagonal</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#setElements(drasys.or.matrix.MatrixI)">setElements</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#setRow(int, drasys.or.matrix.VectorI)">setRow</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#sum()">sum</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#sum(int)">sum</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#sum(int, int, int, int)">sum</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#sumOfSquaredDifferences(double)">sumOfSquaredDifferences</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#sumOfSquaredDifferences(int, double)">sumOfSquaredDifferences</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#sumOfSquaredDifferences(int, int, int, int, double)">sumOfSquaredDifferences</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#sumOfSquares()">sumOfSquares</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#sumOfSquares(int)">sumOfSquares</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#sumOfSquares(int, int, int, int)">sumOfSquares</A>, 
<A HREF="../../../../drasys/or/matrix/Matrix.html#toString()">toString</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_drasys.or.matrix.RealContainer"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class drasys.or.matrix.<A HREF="../../../../drasys/or/matrix/RealContainer.html">RealContainer</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../drasys/or/matrix/RealContainer.html#equals(double, double)">equals</A>, 
<A HREF="../../../../drasys/or/matrix/RealContainer.html#getEpsilon()">getEpsilon</A>, 
<A HREF="../../../../drasys/or/matrix/RealContainer.html#getGlobalEpsilon()">getGlobalEpsilon</A>, 
<A HREF="../../../../drasys/or/matrix/RealContainer.html#setEpsilon(double)">setEpsilon</A>, 
<A HREF="../../../../drasys/or/matrix/RealContainer.html#setGlobalEpsilon(double)">setGlobalEpsilon</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
wait, 
wait, 
wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="QuadraticMatrix(drasys.or.matrix.MatrixI)"><!-- --></A><H3>
QuadraticMatrix</H3>
<PRE>
public <B>QuadraticMatrix</B>(<A HREF="../../../../drasys/or/matrix/MatrixI.html">MatrixI</A>&nbsp;matrix)</PRE>
<DL>
<DD>Add columns to matrix to create a new matrix containing the original variables plus the quadratic variables.</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="getProductIndex(int, int)"><!-- --></A><H3>
getProductIndex</H3>
<PRE>
public int <B>getProductIndex</B>(int&nbsp;column1,
                           int&nbsp;column2)</PRE>
<DL>
<DD>Return the index of the column in the quadratic matrix for the product term for column-1 and column-2.</DL>
<HR>

<A NAME="functionElementAt(int, int)"><!-- --></A><H3>
functionElementAt</H3>
<PRE>
public double <B>functionElementAt</B>(int&nbsp;row,
                                int&nbsp;column)</PRE>
<DL>
<DD>Computes the values for the additional columns.<DD><DL>
<DT><B>Overrides:</B><DD><A HREF="../../../../drasys/or/matrix/FunctionMatrix.html#functionElementAt(int, int)">functionElementAt</A> in class <A HREF="../../../../drasys/or/matrix/FunctionMatrix.html">FunctionMatrix</A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../drasys/or/stat/model/PolynomialMatrix.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../drasys/or/stat/model/ReverseLinear.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="QuadraticMatrix.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_drasys.or.matrix.FunctionMatrix">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
Copyright(C)1997-2000 by DRA Systems all rights reserved. <A HREF=http://OpsResearch.com TARGET=HOME>OpsResearch.com</A>
</BODY>
</HTML>
